home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
fg
/
fgl402c
/
exc.arj
/
TEMP
/
09-09.C
< prev
next >
Wrap
Text File
|
1995-01-20
|
829b
|
39 lines
#include <fastgraf.h>
#include <stdio.h>
#include <stdlib.h>
void main(void);
void main()
{
int new_mode, old_mode;
int read_status, write_status;
fg_initpm();
new_mode = fg_bestmode(320,200,1);
if (new_mode < 0 || new_mode == 12)
{
printf("This program requires a 320 ");
printf("x 200 color graphics mode.\n");
exit(1);
}
old_mode = fg_getmode();
fg_setmode(new_mode);
fg_move(0,199);
read_status = fg_showspr("CORAL.SPR",320);
fg_waitkey();
if (read_status == 0)
write_status = fg_makespr(0,319,80,99,"NEW.SPR");
else
write_status = 1;
fg_setmode(old_mode);
fg_reset();
if (read_status == 1)
printf("CORAL.SPR not found.\n");
if (write_status == 1)
printf("NEW.SPR not created.\n");
}